/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WmsBarBind extends BasicModel<WmsBarBind> {
  parentSnCode?: string; // 父层条码
  snCode?: string; // 条码
}

export const wmsBarBindList = (params?: WmsBarBind | any) =>
  defHttp.get<WmsBarBind>({ url: adminPath + '/bind/wmsBarBind/list', params });

export const wmsBarBindListData = (params?: WmsBarBind | any) =>
  defHttp.post<Page<WmsBarBind>>({ url: adminPath + '/bind/wmsBarBind/listData', params });

export const wmsBarBindForm = (params?: WmsBarBind | any) =>
  defHttp.get<WmsBarBind>({ url: adminPath + '/bind/wmsBarBind/form', params });

export const wmsBarBindSave = (params?: any, data?: WmsBarBind | any) =>
  defHttp.postJson<WmsBarBind>({ url: adminPath + '/bind/wmsBarBind/save', params, data });

export const wmsBarBindDelete = (params?: WmsBarBind | any) =>
  defHttp.get<WmsBarBind>({ url: adminPath + '/bind/wmsBarBind/delete', params });
